// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import App from "./App";
import router from "./router";
import store from "./store";

// import axios from 'axios'

// import qs from 'qs'
/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  store,
  components: { App },
  template: "<App/>"
});

// Vue.config.productionTip = false
// // 添加请求拦截器
// axios.interceptors.request.use(function (config) {
//   if (config.method !== 'get') {
//     config.data = qs.stringify(config.data)
//   }

//   config.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
//   let token = window.sessionStorage.getItem('TOKEN')
//   if (token) {
//     config.headers.common['Authorization'] = 'Bearer ' + token
//   }
//   return config
// }, function (error) {
//   return Promise.reject(error)
// })
